﻿using AdminApiTemplate.Infrastructures;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;

namespace Promote.Infrastructures.Domains
{
    /// <summary>
    /// 接口日志
    /// </summary>
    [Description("接口日志")]
    [Table("ApiLog")]
    public class ApiLog : TableUserModelBase
    {
        /// <summary>
        /// 请求方式 POST/GET
        /// </summary>
        [Description("请求方式 POST/GET")]
        public string HttpMethod { get; set; }

        /// <summary>
        /// 接口地址
        /// </summary>
        [Description("接口地址")]
        public string Url { get; set; }

        /// <summary>
        /// 是否成功
        /// </summary>
        [Description("是否成功")]
        public bool? Success { get; set; }

        /// <summary>
        /// 耗时（ms）
        /// </summary>
        [Description("耗时（ms）")]
        public long? CostTime { get; set; }

        /// <summary>
        /// 请求参数
        /// </summary>
        [Description("请求参数")]
        public string Request { get; set; }

        /// <summary>
        /// 请求参数Hash
        /// </summary>
        [Description("请求参数Hash")]
        public string RequestHash { get; set; }

        /// <summary>
        /// 请求参数
        /// </summary>
        [Description("请求参数")]
        public string Response { get; set; }

        /// <summary>
        /// 请求参数Hash
        /// </summary>
        [Description("请求参数Hash")]
        public string ResponseHash { get; set; }

        /// <summary>
        /// 错误信息
        /// </summary>
        [Description("错误信息")]
        public string Error { get; set; }

        /// <summary>
        /// 错误信息Hash
        /// </summary>
        [Description("错误信息Hash")]
        public string ErrorHash { get; set; }

        /// <summary>
        /// 每次请求的标识
        /// </summary>
        [Description("每次请求的标识")]
        public string RequestId { get; set; }
    }
}
